Skip to content

feat: Refactors 3d-simple-map to use declarative model.#1138

Open
willum070 wants to merge 4 commits intomainfrom
refactor-3d-simple-map
Open

feat: Refactors 3d-simple-map to use declarative model.#1138
willum070 wants to merge 4 commits intomainfrom
refactor-3d-simple-map

Conversation

@willum070
Copy link
Collaborator

@willum070 willum070 commented Feb 25, 2026

This PR does the following things:

  • Refactors the 3d-simple-map sample to use gmp-map-3d.
  • Removes ts-nocheck, adds ts-ignores where needed (not all typings exist yet; let's keep asking them for typings!)
  • Updates copyright dates in license headers.
  • Adds an event handler so the inner map loads at the correct moment.

This change should tell us more about why the test is failing (I suspect it's a race condition)
Taking another tack: Wait for the map to finish loading before accessing the inner map.

Hopefully this moves the needle correctly.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Chris:
if you want to use our JS properties and methods, there are several patterns you can use, but the easiest is first doing await customElements.whenDefined(tagName)
you can see an example of this here: https://developers.google.com/maps/documentation/javascript/examples/web-components-events
however that example is actually sort of wrong. it doesn't need the customElements.whenDefined at all (I'll leave it to you to track fixing that)
(it also uses .then() syntax instead of await)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant